package com.threefish.modules.sys.entity.setting;

import com.threefish.common.entity.AbstractBaseEntity;
import org.nutz.dao.entity.annotation.*;
import org.nutz.plugins.validation.annotation.Validations;

import java.sql.Timestamp;

/**
 * @author 黄川 306955302@qq.com
 * @date: 2018/5/21
 * 描述此类：系统配置信息
 */
@Table("sys_options")
@Comment("系统配置信息")
public class Options extends AbstractBaseEntity {

    @Name
    @Comment("唯一ID")
    @Default("0")
    private String id;

    @Column
    @Default("0")
    @Comment("第一次登录后需要修改密码")
    private boolean fristLoginNeedChangePass;

    @Default("3")
    @Column
    @Comment("密码定时过期-按月-3个月过期提醒 0永不过期")
    private int passExpired;


    @Default("0")
    @Column
    @Comment("0无验证  1字母加数字不小于6位  2字母大小写都有加数字  3字母大小写都有加数字加特殊字符")
    private int passStrength;

    @Default("5")
    @Column
    @Comment("登录错误次数限制 输入次数-冻结15分钟")
    private int errorPassInputTimes;

    @Default("1")
    @Column
    @Comment("登录错误多少次需要输入验证码 -1 不需要验证码 0一直需要")
    private int needVerificationCode;

    @Column
    @Comment("系统版本号")
    @Validations(required = true, strLen = {3, 50}, errorMsg = "系统版本号不可为空，并且长度在3-50之间")
    private String version;

    @Column
    @Comment("系统注册码")
    @Validations(required = true, strLen = {20, 128}, errorMsg = "系统注册码不可为空，并且长度在20-128之间")
    private String registrationCode;

    @Column
    @Comment("注册时间")
    private Timestamp registrationTime;

    @Column
    @Comment("单位名称-当单位名称修改后注册码失效-需要重新注册")
    @Validations(required = true, strLen = {2, 128}, errorMsg = "单位名称不可为空，并且长度在2-128之间")
    private String unitName;

    @Column
    @Comment("系统名称")
    @Validations(required = true, strLen = {2, 128}, errorMsg = "系统名称不可为空，并且长度在2-128之间")
    private String productLongName;

    @Column
    @Comment("系统英文名称")
    @Validations(required = true, strLen = {2, 128}, errorMsg = "系统英文名称不可为空，并且长度在2-128之间")
    private String productEnLongName;

    @Column
    @Comment("系统logo图片")
    private String productLogo;


    @Column
    @Comment("系统默认主题")
    @Default("1")
    private int theme;

    @Column
    @Comment("系统简称")
    @Validations(required = true, strLen = {1, 50}, errorMsg = "系统简称不可为空，并且长度在1-50之间")
    private String productSortName;

    public int getTheme() {
        return theme;
    }

    public void setTheme(int theme) {
        this.theme = theme;
    }

    public int getNeedVerificationCode() {
        return needVerificationCode;
    }

    public void setNeedVerificationCode(int needVerificationCode) {
        this.needVerificationCode = needVerificationCode;
    }

    public String getProductEnLongName() {
        return productEnLongName;
    }

    public void setProductEnLongName(String productEnLongName) {
        this.productEnLongName = productEnLongName;
    }

    public String getProductLogo() {
        return productLogo;
    }

    public void setProductLogo(String productLogo) {
        this.productLogo = productLogo;
    }

    public int getPassStrength() {
        return passStrength;
    }

    public void setPassStrength(int passStrength) {
        this.passStrength = passStrength;
    }

    public Timestamp getRegistrationTime() {
        return registrationTime;
    }

    public void setRegistrationTime(Timestamp registrationTime) {
        this.registrationTime = registrationTime;
    }

    public boolean isFristLoginNeedChangePass() {
        return fristLoginNeedChangePass;
    }

    public void setFristLoginNeedChangePass(boolean fristLoginNeedChangePass) {
        this.fristLoginNeedChangePass = fristLoginNeedChangePass;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public int getPassExpired() {
        return passExpired;
    }

    public void setPassExpired(int passExpired) {
        this.passExpired = passExpired;
    }

    public int getErrorPassInputTimes() {
        return errorPassInputTimes;
    }

    public void setErrorPassInputTimes(int errorPassInputTimes) {
        this.errorPassInputTimes = errorPassInputTimes;
    }

    public String getVersion() {
        return version;
    }

    public void setVersion(String version) {
        this.version = version;
    }

    public String getRegistrationCode() {
        return registrationCode;
    }

    public void setRegistrationCode(String registrationCode) {
        this.registrationCode = registrationCode;
    }

    public String getUnitName() {
        return unitName;
    }

    public void setUnitName(String unitName) {
        this.unitName = unitName;
    }

    public String getProductLongName() {
        return productLongName;
    }

    public void setProductLongName(String productLongName) {
        this.productLongName = productLongName;
    }

    public String getProductSortName() {
        return productSortName;
    }

    public void setProductSortName(String productSortName) {
        this.productSortName = productSortName;
    }
}

